home *** CD-ROM | disk | FTP | other *** search
-
- 'PrintAltPages: Macro to print alternate pages of a document
-
- Sub Main
-
- On Error Goto Quit
- 'Trap errors and cancel print
-
- Dim dlg As FilePrint
- 'Use record structure FilePrint
- GetCurValues dlg
- 'Retrieve current document values
- Dialog dlg
- 'Get values as defined
-
- For curpage = Val(dlg.From) To Val(dlg.To) Step 2
- 'Determine alternate pages beginning with page specified
-
- pg$ = Str$(curpage)
- 'Page number to pass to FilePrint;
- 'Send each page off to printer or queue
-
- FilePrint dlg.Type, dlg.NumCopies, dlg.Range, \
- pg$, pg$, dlg.Reverse, dlg.Draft, dlg.UpdateFields, \
- dlg.PaperFeed, dlg.Summary, dlg.Annotations, \
- dlg.ShowHidden, dlg.ShowCodes, dlg.FileName
- 'Access all typical print options inprint dialog box
-
- Next
- 'Go to next page to print
-
- Quit: End Sub
-
-